package com.java2_11;

public class java2_11 {
    public static void main(String[] args) {
        //类：就是在里面放置一些属性
        //对象：创造对象，在进行操作
        //无参构造器自己赋值
        Student s = new Student();
        s.setName("zhangsan");
        s.setAge(20);
        s.setSex('男');
        System.out.println(s.getName());
        System.out.println(s.getAge());
        System.out.println(s.getSex());

        //有参构造器直接赋值
        Student s1 = new Student("lisi",20,'女');
        System.out.println(s1.getName());
        System.out.println(s1.getAge());
        System.out.println(s1.getSex());
        s1.cop("wangwu");
    }




}
